package com.Lottry.query;

import android.app.Application;
import android.content.Context;

public abstract class BaseApplication extends Application
{
    private static Application mShellContext;

    private static BaseApplication mShellApp;

    @Override
    protected void attachBaseContext(Context base)
    {
        super.attachBaseContext(base);
    }

    @Override
    public void onCreate()
    {
        super.onCreate();

        shellBridge(this, this);
    }

    public static void shellBridge(Application shellContext, BaseApplication shellApp)
    {
        mShellContext = shellContext;
        mShellApp = shellApp;
    }

    /**
     * 指定应用根目录文件夹名称
     * @return
     */
    public abstract String getRootPath();

    public static BaseApplication getShellApplication()
    {
        return mShellApp;
    }

    public static Application getShellContext()
    {
        return mShellContext;
    }
}
